package com.registration.mapper;

import com.registration.bean.DepartmentBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface DepartmentMapper {
    // 查询一级科室（parent_dept_id为null）
    List<DepartmentBean> selectFirstLevelDepts();

    // 根据父科室ID查询二级科室
    List<DepartmentBean> selectSecondLevelDepts(@Param("parent_dept_id") Integer parent_dept_id);

    // 根据科室ID查询科室信息
    DepartmentBean selectDeptById(@Param("dept_id") Integer dept_id);

    List<DepartmentBean> selectAllDepartments();
}
